import { t } from 'i18next'
import React, { useState } from 'react'
import {
	IconActionCameraRc,
	IconActionChairman,
	IconActionDcs,
	IconActionDelete,
	IconActionDoubleFlow,
	IconActionForceBrd,
	IconActionMix,
	IconActionMtInfo,
	IconActionMtVmp,
	IconActionMute,
	IconActionOffline,
	IconActionOftenMt,
	IconActionOnline,
	IconActionRec,
	IconActionSelect,
	IconActionSilence,
	IconActionSpeaker,
	IconActionUpMt,
	IconActionInteractive,
	IconActionKis,
} from './style'
import { operateType } from './utils'
import useLock from '@/hooks/useLock'
import {
	fetchCallOnlineMt,
	fetchCancelChairman,
	fetchCancelSpeaker,
	fetchCancelUpMt,
	fetchDeleteMt,
	fetchDeleteOftenMt,
	fetchDeleteOnlineMt,
	fetchForceBrd,
	fetchInteractive,
	fetchMute,
	fetchSetChairman,
	fetchSetOftenMt,
	fetchSetSpeaker,
	fetchSetUpMt,
	fetchSilence,
	fetchStartDoubleFlow,
	fetchStopDoubleFlow,
} from '@/api/manager/actions'
import { fetchAddDcsMts, fetchDeleteDcsMts } from '@/api/manager/dcs'
import { useMccStore } from '@/pages/manager/store'
import { IMcc } from '@/api/manager/type'
import { Mt, revert_mt } from '@/api/manager/mt'
import Alert, { Confirm } from '@/components/Alert'
import { store as SmsStore } from '@/pages/manager/blocks/sms/store'
import { paramsRx, useParamsStore } from '@/pages/manager/blocks/main/store'
import { actionButtonsCancel } from '@/pages/manager/store.actionButton'
import { useTimeout } from 'ahooks'
import { useCameraRcStore } from '@/pages/manager/blocks/cameraRc/store'
import { usePlayVideoStore } from '@/pages/manager/blocks/playVideo/store'
import { useSelectStore } from '@/pages/manager/blocks/select/store'
import { useMixStore } from '@/pages/manager/blocks/mix/store'
import { useMccMtVideoStore } from '@/pages/manager/blocks/mccMtVideo/store'
import { useMccMtInfoStore } from '@/pages/manager/blocks/mccMtInfo/store'
import { mccAddMt } from '@/components/AddMt/store.trans'
import { useAutoVmpStore } from '@/components/AutoVmpDialog/store'
import { useGlobalStore } from '@/store/global'
import { useManagerStore } from '@/pages/manager/blocks/main/manager/store'
import { useTableAllStore } from '@/pages/manager/blocks/main/table/all/store'
import { getItemInTree } from '@/pages/manager/blocks/main/table/all/utils'
import { useVmpTypeStore } from '@/pages/manager/blocks/vmp/store.get'
import { useMtVmpStore } from '@/pages/manager/blocks/mtVmp/store'

type ActionComponentType = Record<
	operateType | 'offline' | 'kis',
	(
		mcc: IMcc,
		options: { isCustomMix?: boolean; isSuperMeeting?: boolean; kisOnclick?: (mcc: Mt) => void }
	) => React.ReactNode
>
const Mute = ({ mcc, isIcon }: { mcc: IMcc; isIcon: boolean }) => {
	const onClick = useLock(async () => {
		const meetingMoid = useMccStore.getState().mccInfo.meetingMoid
		await fetchMute(mcc.status.isMute, meetingMoid, mcc)
	})
	return isIcon ? (
		<IconActionMute
			isOn={mcc.status.isMute}
			key="mute"
			title={mcc.status.isMute ? t('取消哑音') : t('设置哑音')}
			onClick={onClick}
		/>
	) : (
		<li key="mute" onClick={onClick}>
			{mcc.status.isMute ? t('取消哑音') : t('设置哑音')}
		</li>
	)
}
const Speaker = ({ mcc, isIcon }: { mcc: IMcc; isIcon: boolean }) => {
	const onClick = useLock(async () => {
		const meetingMoid = useMccStore.getState().mccInfo.meetingMoid
		if (mcc.status.isSpeaker) {
			await fetchCancelSpeaker(meetingMoid, mcc).then((res) => {
				if (res && res.success) {
					if (mcc.isMt) SmsStore.getState().updateList([revert_mt(mcc)])
				}
			})
		} else {
			if (usePlayVideoStore.getState().info.state !== 0) {
				Alert(t('会议放像过程中不能设置发言方'))
				return
			}
			if (usePlayVideoStore.getState().info.state === 1) {
				Alert(t('会议放像暂停后不能设置发言方'))
				return
			}
			if (mcc.mtKey === '0.0.0.0_0') {
				return
			}
			await fetchSetSpeaker(meetingMoid, mcc)
		}
	})
	return isIcon ? (
		<IconActionSpeaker
			isOn={mcc.status.isSpeaker}
			key="speaker"
			title={mcc.status.isSpeaker ? t('释放发言方') : t('指定发言方')}
			onClick={onClick}
		/>
	) : (
		<li key="speaker" onClick={onClick}>
			{mcc.status.isSpeaker ? t('释放发言方') : t('指定发言方')}
		</li>
	)
}
const Chairman = ({ mcc, isIcon }: { mcc: IMcc; isIcon: boolean }) => {
	const onClick = useLock(async () => {
		const meetingMoid = useMccStore.getState().mccInfo.meetingMoid
		if (!mcc.isMt) return
		if (mcc.status.isChairman) {
			const isMeetingAdminOrCreator = useMccStore.getState().isMeetingAdminOrCreator
			if (isMeetingAdminOrCreator) {
				await fetchCancelChairman(meetingMoid, mcc).then((res) => {
					if (res && res.success) {
						SmsStore.getState().updateList([revert_mt(mcc)])
					}
				})
			} else {
				Confirm(t('若取消自己管理方，您将失去管理方权限'), () => fetchCancelChairman(meetingMoid, mcc))
			}
		} else {
			if (mcc.mtKey === '0.0.0.0_0') {
				return
			}
			if (mcc.mtType == 9) {
				Alert(t('简单级联会议不能设为管理方'))
				return
			}
			if (mcc.confLevel === 1 || mcc.confLevel === 3) {
				Alert(t('只能设置本级终端为管理方'))
				return
			}
			const isMeetingAdminOrCreator = useMccStore.getState().isMeetingAdminOrCreator
			if (isMeetingAdminOrCreator) {
				await fetchSetChairman(meetingMoid, mcc)
			} else {
				Confirm(t('若要重置管理方，您将失去管理方权限'), () => fetchSetChairman(meetingMoid, mcc))
			}
		}
	})
	if (!mcc.isMt) return null
	return isIcon ? (
		<IconActionChairman
			isOn={mcc.status.isChairman}
			key="chairman"
			title={mcc.status.isChairman ? t('释放管理方') : t('指定管理方')}
			onClick={onClick}
		/>
	) : (
		<li key="chairman" onClick={onClick}>
			{mcc.status.isChairman ? t('释放管理方') : t('指定管理方')}
		</li>
	)
}
const Silence = ({ mcc, isIcon }: { mcc: IMcc; isIcon: boolean }) => {
	const meetingMoid = useMccStore((state) => state.mccInfo.meetingMoid)
	const onClick = useLock(async () => {
		fetchSilence(mcc.status.isSilence, meetingMoid, mcc)
	})
	return isIcon ? (
		<IconActionSilence
			isOn={mcc.status.isSilence}
			key="silence"
			title={mcc.status.isSilence ? t('取消静音') : t('静音')}
			onClick={onClick}
		/>
	) : (
		<li key="silence" onClick={onClick}>
			{mcc.status.isSilence ? t('取消静音') : t('静音')}
		</li>
	)
}
const DoubleFlow = ({ mcc, isIcon }: { mcc: IMcc; isIcon: boolean }) => {
	const meetingMoid = useMccStore((state) => state.mccInfo.meetingMoid)
	const onClick = useLock(async () => {
		mcc.status.isDoubleFlow
			? await fetchStopDoubleFlow(meetingMoid, mcc)
			: await fetchStartDoubleFlow(meetingMoid, mcc)
	})
	return isIcon ? (
		<IconActionDoubleFlow
			isOn={mcc.status.isDoubleFlow}
			key="doubleFlow"
			title={mcc.status.isDoubleFlow ? t('取消内容共享') : t('开启内容共享')}
			onClick={onClick}
		/>
	) : (
		<li key="doubleFlow" onClick={onClick}>
			{mcc.status.isDoubleFlow ? t('取消内容共享') : t('开启内容共享')}
		</li>
	)
}
const CameraRc = ({ mcc, isIcon }: { mcc: IMcc; isIcon: boolean }) => {
	if (!mcc.isMt) return null
	const onClick = () => {
		// rxMainOut.actionFetch.cameraRc(mcc)
		if (mcc.status.isStream) {
			Alert(t('多流终端暂不支持远摇！'))
			return
		}
		useCameraRcStore.getState().update({
			mt: mcc,
			mt_id: mcc.mtKey,
		})
		// useMonitorStore.getState().closeRollCall()
		useMccStore.getState().setCurPage('mt_camera')
		actionButtonsCancel()
	}
	return isIcon ? (
		<IconActionCameraRc key="cameraRc" title={t('摄像机远遥')} onClick={onClick} />
	) : (
		<li key="cameraRc" onClick={onClick}>
			{t('摄像机远遥')}
		</li>
	)
}
const Select = ({ mcc, isIcon }: { mcc: IMcc; isIcon: boolean }) => {
	if (!mcc.isMt) return null
	const onClick = () => {
		// rxMainOut.actionFetch.select(revert_mt(mcc))
		let mt = revert_mt(mcc)
		if (useMccStore.getState().curPage === 'mt_select') {
			useSelectStore.getState().addListDes([mt])
			useSelectStore.getState().toggleClick(mt.mt_key)
		} else {
			useSelectStore.getState().update({
				is_call_back: true,
				is_call_back_mt: [mt],
			})
			useMccStore.getState().setCurPage('mt_select')
		}
		useParamsStore.setState({ actionButtonList: [] })
	}
	return isIcon ? (
		<IconActionSelect key="select" title={t('终端选看')} onClick={onClick} />
	) : (
		<li key="select" onClick={onClick}>
			{t('终端选看')}
		</li>
	)
}
const Mix = ({ mcc, isIcon, isCustomMix }: { mcc: IMcc; isIcon: boolean; isCustomMix: boolean }) => {
	if (!mcc.isMt) return null
	const onClick = () => {
		// rxMainOut.actionFetch.mix(revert_mt(mcc))
		let mt = revert_mt(mcc)
		if (useMccStore.getState().curPage === 'mix') {
			useMixStore.getState().render([mt])
		} else {
			useMixStore.getState().update({
				is_call_back: true,
				is_call_back_mt: [mt],
			})
			useMccStore.getState().setCurPage('mix')
		}
	}
	return isIcon ? (
		<IconActionMix
			key="mix"
			title={mcc.status.isMix && isCustomMix ? t('取消定制混音') : t('添加到定制混音')}
			onClick={onClick}
		/>
	) : (
		<li key="mix" onClick={onClick}>
			{mcc.status.isMix && isCustomMix ? t('取消定制混音') : t('添加到定制混音')}
		</li>
	)
}
const Rec = ({ mcc, isIcon }: { mcc: IMcc; isIcon: boolean }) => {
	if (!mcc.isMt) return null
	if (!useGlobalStore.getState().SWITCH.vrs.video) return null
	const onClick = () => {
		// rxMainOut.actionFetch.rec(revert_mt(mcc))
		let mt = revert_mt(mcc)
		useMccMtVideoStore.getState().rec([{ mt: mt }], 'terminalRecording')
	}
	return isIcon ? (
		<IconActionRec key="rec" title={t('终端录像')} onClick={onClick} />
	) : (
		<li key="rec" onClick={onClick}>
			{t('终端录像')}
		</li>
	)
}
const OftenMt = ({ mcc, isIcon, isSuperMeeting }: { mcc: IMcc; isIcon: boolean; isSuperMeeting: boolean }) => {
	const meetingMoid = useMccStore((state) => state.mccInfo.meetingMoid)
	const SWITCH = useGlobalStore((state) => state.SWITCH)
	const [time, setTime] = useState<number | undefined>(undefined)
	const onClickOften = useLock(async () => {
		if (!mcc.isMt) return
		mcc.status.isOftenMt ? await fetchDeleteOftenMt(meetingMoid, mcc) : await fetchSetOftenMt(meetingMoid, mcc)
	})
	useTimeout(async () => {
		setTime(undefined)
	}, time)
	const onClickInteractive = () => {
		if (!mcc.isMt || time) return
		fetchInteractive(meetingMoid, mcc)
		setTime(2000)
	}
	if (!mcc.isMt) return null
	return isIcon ? (
		isSuperMeeting ? (
			<IconActionInteractive
				isOn={mcc.status.isInteractive}
				key="interactive"
				title={mcc.status.isInteractive ? t('取消互动终端') : t('设置互动终端')}
				onClick={onClickInteractive}
			/>
		) : !!SWITCH.showOftenMt ? (
			<IconActionOftenMt
				isOn={mcc.status.isOftenMt}
				key="oftenMt"
				title={mcc.status.isOftenMt ? t('取消常用终端') : t('设置常用终端')}
				onClick={onClickOften}
			/>
		) : (
			<></>
		)
	) : isSuperMeeting ? (
		<li key="interactive" onClick={onClickInteractive}>
			{mcc.status.isInteractive ? t('取消互动终端') : t('设置互动终端')}
		</li>
	) : !!SWITCH.showOftenMt ? (
		<li key="oftenMt" onClick={onClickOften}>
			{mcc.status.isOftenMt ? t('取消常用终端') : t('设置常用终端')}
		</li>
	) : (
		<></>
	)
}
const Dcs = ({ mcc, isIcon }: { mcc: IMcc; isIcon: boolean }) => {
	const meetingMoid = useMccStore((state) => state.mccInfo.meetingMoid)
	const onClick = useLock(async () => {
		if (!mcc.isMt) return
		mcc.status.isDcs ? await fetchDeleteDcsMts(meetingMoid, [mcc]) : await fetchAddDcsMts(meetingMoid, [mcc])
	})
	if (!mcc.isMt) return null
	if (!useGlobalStore.getState().SWITCH.dcs) return null
	return isIcon ? (
		<IconActionDcs
			isOn={mcc.status.isDcs}
			key="dcs"
			title={mcc.status.isDcs ? t('退出协作') : t('参与协作')}
			onClick={onClick}
		/>
	) : (
		<li key="dcs" onClick={onClick}>
			{mcc.status.isDcs ? t('退出协作') : t('参与协作')}
		</li>
	)
}
const MtVmp = ({ mcc, isIcon }: { mcc: IMcc; isIcon: boolean }) => {
	const chairman = useManagerStore((state) => state.chairman)
	if (!mcc.isMt) return null
	const isChairman = chairman && chairman.mtKey && chairman.mtKey === mcc.mtKey
	const onClick = () => {
		if (mcc.isMt && mcc.confLevel !== 2) {
			Alert(t('本级终端才能操作自主多画面'))
			return
		}
		if (isChairman) {
			const tableAll = useTableAllStore.getState().tree
			const batchMembers: Mt[] = []
			getItemInTree(tableAll, (item) => {
				if (
					item.mcc.confLevel === 2 &&
					item.mcc.isMt &&
					item.mcc.status.isOnline &&
					item.mcc.mtType !== 7 &&
					item.mcc.mtType !== 9
				) {
					batchMembers.push(new Mt(revert_mt(item.mcc)))
				}
			})
			useVmpTypeStore.setState({ type: `mtVmp_${mcc.mtKey}` })
			useMtVmpStore.setState({
				isOpen: true,
				isShowPlanOperateModal: false,
				batchMembers,
				mt_info: mcc,
				onClose: () => {
					useMccStore.getState().setCurPage('mcc_main')
				},
			})
			useMccStore.getState().setCurPage('mtvmp')
		} else {
			useMccStore.getState().setCurPage('mcc_main')
			useAutoVmpStore.setState({
				isOpen: true,
				mode: 'mtVmp',
				mtInfo: mcc,
				onClose: () => {
					useAutoVmpStore.getState().reset()
				},
			})
		}
	}
	return isIcon ? (
		<IconActionMtVmp key="mtVmp" title={isChairman ? t('管理方画面合成') : t('自主多画面')} onClick={onClick} />
	) : (
		<li key="mtVmp" onClick={onClick}>
			{isChairman ? t('管理方画面合成') : t('自主多画面')}
		</li>
	)
}
const UpMt = ({ mcc, isIcon }: { mcc: IMcc; isIcon: boolean }) => {
	const meetingMoid = useMccStore((state) => state.mccInfo.meetingMoid)
	const onClick = useLock(async () => {
		mcc.status.isUpMt ? await fetchCancelUpMt(meetingMoid, mcc) : await fetchSetUpMt(meetingMoid, mcc)
	})
	if (!mcc.isMt) return null
	return isIcon ? (
		<IconActionUpMt
			isOn={mcc.status.isUpMt}
			key="upMt"
			title={mcc.status.isUpMt ? t('取消上传') : t('上传')}
			onClick={onClick}
		/>
	) : (
		<li key="upMt" onClick={onClick}>
			{mcc.status.isUpMt ? t('取消上传') : t('上传')}
		</li>
	)
}
const ForceBrd = ({ mcc, isIcon }: { mcc: IMcc; isIcon: boolean }) => {
	const meetingMoid = useMccStore((state) => state.mccInfo.meetingMoid)
	const onClick = useLock(async () => {
		if (!mcc.isMt) return
		await fetchForceBrd(meetingMoid, mcc, !mcc.status.isForceBrd)
	})
	if (!mcc.isMt) return null
	return isIcon ? (
		<IconActionForceBrd
			isOn={mcc.status.isForceBrd}
			key="forceBrd"
			title={mcc.status.isForceBrd ? t('取消强制广播') : t('强制广播')}
			onClick={onClick}
		/>
	) : (
		<li key="forceBrd" onClick={onClick}>
			{mcc.status.isForceBrd ? t('取消强制广播') : t('强制广播')}
		</li>
	)
}
const MtInfo = ({ mcc, isIcon }: { mcc: IMcc; isIcon: boolean }) => {
	const onClick = () => {
		// rxMainOut.actionFetch.mtInfo(mcc)
		useMccMtInfoStore.getState().setMt({
			isMt: mcc.isMt,
			mtKey: mcc.mtKey,
			mtid: mcc.isMt ? mcc.mtid : mcc.smcuMtid,
			confLevel: mcc.confLevel,
			e164: mcc.isMt ? mcc.e164 : mcc.account,
			interactiveMt:
				useMccStore.getState().mccInfo.superMtNum === 0 ? 1 : (mcc as Mt).status.isInteractive ? 1 : 0,
		})
		useMccStore.getState().setCurPage('mt_info')
		actionButtonsCancel()
		const meetingType = useMccStore.getState().mccInfo.meetingType
		if (meetingType === 2) {
			useParamsStore.getState().refreshTableWidth()
		}
	}
	return isIcon ? (
		<IconActionMtInfo key="mtInfo" title={t('终端信息')} onClick={onClick} />
	) : (
		<li key="mtInfo" onClick={onClick}>
			{t('终端信息')}
		</li>
	)
}
const Delete = ({ mcc, isIcon }: { mcc: IMcc; isIcon: boolean }) => {
	const meetingMoid = useMccStore((state) => state.mccInfo.meetingMoid)
	const onClick = useLock(async () => {
		Confirm(t('确定要删除 {{name}} 吗？', { name: mcc.name }), () => {
			fetchDeleteMt(meetingMoid, [mcc])
		})
	})
	return isIcon ? (
		<IconActionDelete key="delete" title={t('删除终端')} onClick={onClick} />
	) : (
		<li key="delete" onClick={onClick}>
			{t('删除终端')}
		</li>
	)
}
const Online = ({ mcc, isIcon }: { mcc: IMcc; isIcon: boolean }) => {
	const meetingMoid = useMccStore((state) => state.mccInfo.meetingMoid)
	const onClick = useLock(async () => {
		let text =
			mcc.isMt && mcc.accountType === 6
				? t('确定要断开 {{name}}  吗？', { name: mcc.name })
				: t('确定要挂断 {{name}}  吗？', { name: mcc.name })
		Confirm(text, () => {
			fetchDeleteOnlineMt(meetingMoid, [mcc])
		})
	})
	return isIcon ? (
		<IconActionOnline key="online" title={t('挂断')} onClick={onClick} />
	) : (
		<li key="online" onClick={onClick}>
			{t('挂断')}
		</li>
	)
}
const Offline = ({ mcc, isIcon }: { mcc: IMcc; isIcon: boolean }) => {
	const meetingMoid = useMccStore((state) => state.mccInfo.meetingMoid)
	const onClick = useLock(async () => {
		paramsRx.tableItemCalling$.next(mcc.mtKey)
		let _flag = true
		if (mcc.isMt) {
			if (!mcc.mtid && mcc.confLevel !== 2 /**下级离线终端*/) {
				_flag = false
			}
			if (_flag) {
				await fetchCallOnlineMt(meetingMoid, [mcc])
			} else {
				await mccAddMt([mcc], '', true)
			}
		} else {
			await fetchCallOnlineMt(meetingMoid, [mcc])
		}
	})
	return isIcon ? (
		<IconActionOffline key="offline" title={t('呼叫')} onClick={onClick} />
	) : (
		<li key="offline" onClick={onClick}>
			{t('呼叫')}
		</li>
	)
}
export const OperateIconComponent: ActionComponentType = {
	mute: (mcc) => {
		return <Mute mcc={mcc} isIcon={true} key="mute"></Mute>
	},
	speaker: (mcc) => {
		return <Speaker mcc={mcc} isIcon={true} key="speaker"></Speaker>
	},
	chairman: (mcc) => {
		return <Chairman mcc={mcc} isIcon={true} key="chairman"></Chairman>
	},
	doubleFlow: (mcc) => {
		return <DoubleFlow mcc={mcc} isIcon={true} key="doubleFlow"></DoubleFlow>
	},
	silence: (mcc) => {
		return <Silence mcc={mcc} isIcon={true} key="silence"></Silence>
	},
	cameraRc: (mcc) => {
		return <CameraRc mcc={mcc} isIcon={true} key="cameraRc"></CameraRc>
	},
	select: (mcc) => {
		return <Select mcc={mcc} isIcon={true} key="select"></Select>
	},
	mix: (mcc, { isCustomMix }) => {
		return <Mix mcc={mcc} isIcon={true} isCustomMix={isCustomMix ? true : false} key="mix"></Mix>
	},
	rec: (mcc) => {
		return <Rec mcc={mcc} isIcon={true} key="rec"></Rec>
	},
	oftenMt: (mcc, { isSuperMeeting }) => {
		return (
			<OftenMt
				mcc={mcc}
				isIcon={true}
				isSuperMeeting={isSuperMeeting ? true : false}
				key={isSuperMeeting ? 'interactive' : 'often'}
			></OftenMt>
		)
	},
	dcs: (mcc) => {
		return <Dcs mcc={mcc} isIcon={true} key="dcs"></Dcs>
	},
	mtVmp: (mcc) => {
		return <MtVmp mcc={mcc} isIcon={true} key="mtVmp"></MtVmp>
	},
	upMt: (mcc) => {
		return <UpMt mcc={mcc} isIcon={true} key="upMt"></UpMt>
	},
	forceBrd: (mcc) => {
		return <ForceBrd mcc={mcc} isIcon={true} key="forceBrd"></ForceBrd>
	},
	mtInfo: (mcc) => {
		return <MtInfo mcc={mcc} isIcon={true} key="mtInfo"></MtInfo>
	},
	delete: (mcc) => {
		return <Delete mcc={mcc} isIcon={true} key="delete"></Delete>
	},
	online: (mcc) => {
		return <Online mcc={mcc} isIcon={true} key="online"></Online>
	},
	offline: (mcc) => {
		return <Offline mcc={mcc} isIcon={true} key="offline"></Offline>
	},
	kis: (mcc, { kisOnclick }) => {
		if (!mcc.isMt) return null
		const onClick = () => {
			kisOnclick && kisOnclick(mcc)
		}
		return <IconActionKis key="kis" title={t('远程开机')} onClick={onClick} />
	},
}
export const DropDownComponent: Omit<ActionComponentType, 'kis'> = {
	mute: (mcc) => {
		return <Mute mcc={mcc} isIcon={false} key="mute"></Mute>
	},
	speaker: (mcc) => {
		return <Speaker mcc={mcc} isIcon={false} key="speaker"></Speaker>
	},
	chairman: (mcc) => {
		return <Chairman mcc={mcc} isIcon={false} key="chairman"></Chairman>
	},
	doubleFlow: (mcc) => {
		return <DoubleFlow mcc={mcc} isIcon={false} key="doubleFlow"></DoubleFlow>
	},
	silence: (mcc) => {
		return <Silence mcc={mcc} isIcon={false} key="silence"></Silence>
	},
	cameraRc: (mcc) => {
		return <CameraRc mcc={mcc} isIcon={false} key="cameraRc"></CameraRc>
	},
	select: (mcc) => {
		return <Select mcc={mcc} isIcon={false} key="select"></Select>
	},
	mix: (mcc, { isCustomMix }) => {
		return <Mix mcc={mcc} isIcon={false} isCustomMix={isCustomMix ? true : false} key="mix"></Mix>
	},
	rec: (mcc) => {
		return <Rec mcc={mcc} isIcon={false} key="rec"></Rec>
	},
	oftenMt: (mcc, { isSuperMeeting }) => {
		return <OftenMt mcc={mcc} isIcon={false} isSuperMeeting={isSuperMeeting ? true : false} key="oftenMt"></OftenMt>
	},
	dcs: (mcc) => {
		return <Dcs mcc={mcc} isIcon={false} key="dcs"></Dcs>
	},
	mtVmp: (mcc) => {
		return <MtVmp mcc={mcc} isIcon={false} key="mtVmp"></MtVmp>
	},
	upMt: (mcc) => {
		return <UpMt mcc={mcc} isIcon={false} key="upMt"></UpMt>
	},
	forceBrd: (mcc) => {
		return <ForceBrd mcc={mcc} isIcon={false} key="forceBrd"></ForceBrd>
	},
	mtInfo: (mcc) => {
		return <MtInfo mcc={mcc} isIcon={false} key="mtInfo"></MtInfo>
	},
	delete: (mcc) => {
		return <Delete mcc={mcc} isIcon={false} key="delete"></Delete>
	},
	online: (mcc) => {
		return <Online mcc={mcc} isIcon={false} key="online"></Online>
	},
	offline: (mcc) => {
		return <Offline mcc={mcc} isIcon={false} key="offline"></Offline>
	},
}
